Skip to content

Conversation

@vnikolova
Copy link
Collaborator

Details:

  • Update paths in procedures, code samples and screenshots.
  • Remove the tutorial-get-started project from codeSnippets project to enable the use of version catalog.
  • Update the maven project and affected topics.
  • Add a warning in tutorial and Configuration in a file topics regarding YAML limitation in Maven projects.

Related issues:

KTOR-8962
KTOR-9002

@vnikolova vnikolova requested a review from bjhham October 23, 2025 14:37
@coderabbitai
Copy link

coderabbitai bot commented Oct 23, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Removed the tutorial-server-get-started module from root Gradle settings and converted the tutorial into standalone Maven and Gradle sample projects: added/updated build files, Gradle wrapper and catalog, EngineMain-based entrypoints, routing and tests, resources, and documentation/topic edits.

Changes

Cohort / File(s) Summary
Root settings
codeSnippets/settings.gradle.kts
Removed the module("snippets", "tutorial-server-get-started") inclusion.
Maven snippet — build & packaging
codeSnippets/snippets/tutorial-server-get-started-maven/pom.xml
Bumped plugin/dependency versions, set main class to io.ktor.server.netty.EngineMain, added status-pages dependency, upgraded maven-assembly-plugin.
Maven snippet — sources added
codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/Application.kt, codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/Routing.kt
Added EngineMain entrypoint and Application.module(), reorganized routing (includes /test1, /error-test), adjusted packages/imports.
Maven snippet — sources removed
codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/com/example/Application.kt, codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/com/example/plugins/Routing.kt
Deleted embeddedServer bootstrap and previous configureRouting() plugin file.
Maven snippet — tests & logging
codeSnippets/snippets/tutorial-server-get-started-maven/src/main/resources/logback.xml, codeSnippets/snippets/tutorial-server-get-started-maven/src/test/kotlin/ApplicationTest.kt, codeSnippets/snippets/tutorial-server-get-started-maven/src/test/kotlin/com/example/ApplicationTest.kt
Changed log level to INFO, added a new test file with two tests, and removed the old test file.
Gradle snippet — build, catalog, properties
codeSnippets/snippets/tutorial-server-get-started/build.gradle.kts, codeSnippets/snippets/tutorial-server-get-started/gradle.properties, codeSnippets/snippets/tutorial-server-get-started/gradle/libs.versions.toml
Switched to version-catalog aliases, added group/version, changed application mainClass syntax, added kotlin.code.style=official, and added libs.versions.toml.
Gradle snippet — wrapper & scripts
codeSnippets/snippets/tutorial-server-get-started/gradle/wrapper/gradle-wrapper.properties, codeSnippets/snippets/tutorial-server-get-started/gradlew, codeSnippets/snippets/tutorial-server-get-started/gradlew.bat
Added Gradle wrapper config (Gradle 8.14.3) and POSIX/Windows wrapper scripts.
Gradle snippet — settings & README
codeSnippets/snippets/tutorial-server-get-started/settings.gradle.kts, codeSnippets/snippets/tutorial-server-get-started/README.md
Added settings.gradle.kts (rootProject.name = "ktor-sample", Maven Central), updated README wording and run instructions.
Gradle snippet — sources & tests added
codeSnippets/snippets/tutorial-server-get-started/src/main/kotlin/Application.kt, codeSnippets/snippets/tutorial-server-get-started/src/main/kotlin/Routing.kt, codeSnippets/snippets/tutorial-server-get-started/src/test/kotlin/ApplicationTest.kt
Added EngineMain entrypoint and Application.module(), introduced configureRouting() (status-pages, static resources, /test1, /error-test), and two tests.
Gradle snippet — sources & tests removed
codeSnippets/snippets/tutorial-server-get-started/src/main/kotlin/com/example/Application.kt, codeSnippets/snippets/tutorial-server-get-started/src/test/kotlin/com/example/ApplicationTest.kt
Deleted previous packaged bootstrap file and its test.
Gradle snippet — resources
codeSnippets/snippets/tutorial-server-get-started/src/main/resources/application.yaml, .../logback.xml, .../mycontent/sample.html
Added application.yaml (module + port), set logback root level to INFO, and minor HTML reformatting.
Documentation & topics
topics/lib.topic, topics/server-configuration-file.topic, topics/maven-assembly-plugin.md, topics/server-create-a-new-project.topic
Added version-catalog guidance, YAML warning for Maven projects, adjusted EngineMain/embeddedServer guidance, and extensive edits to the project-creation tutorial (names, paths, snippets, structure).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Areas to focus on:

  • Consistency of main class and startup approach between Maven and Gradle artifacts.
  • Tests wiring to the new Application.module() and routing changes (status-pages, exception handling).
  • Removal of tutorial-server-get-started from root settings and its impact on aggregated builds/CI.
  • Version-catalog entries and potential typos (e.g., yFaml vs yaml).

Possibly related PRs

Suggested labels

dependencies

Suggested reviewers

  • Stexxe
  • e5l
  • marychatte

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "KTOR-8962 Update the Create a new Ktor project tutorial" is directly related to the changeset. The raw summary confirms substantial updates to tutorial files, documentation topics, and tutorial-related projects, including modifications to server-create-a-new-project.topic, lib.topic, maven-assembly-plugin.md, and the tutorial-server-get-started project structure. The title clearly communicates that this is about updating a tutorial, which is the high-level purpose of the PR, and a teammate scanning the history would understand the intent without requiring deeper context about the implementation details like version catalog reorganization.
Description Check ✅ Passed The PR description is clearly related to the changeset and provides specific, actionable details about what was changed. The raw summary confirms all points mentioned: the removal of tutorial-get-started from codeSnippets (reflected in settings.gradle.kts changes), updates to paths in documentation topics and code samples, modifications to the Maven project (pom.xml and related files), and the addition of YAML limitation warnings in topics/server-configuration-file.topic and other documentation. The description is neither vague nor off-topic, and it directly maps to observable changes in the provided summary.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b191c56 and eb0b645.

📒 Files selected for processing (1)
  • topics/server-create-a-new-project.topic (30 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@vnikolova vnikolova self-assigned this Oct 23, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

🧹 Nitpick comments (5)
codeSnippets/snippets/tutorial-server-get-started/src/test/kotlin/ApplicationTest.kt (1)

33-35: Make content-type assertion robust against charset parameters.

Comparing only the subtype can pass for wrong types. Either assert both type and subtype, or match against ContentType.Text.Html:

-assertEquals("html", response.contentType()?.contentSubtype)
+assertEquals("text", response.contentType()?.contentType)
+assertEquals("html", response.contentType()?.contentSubtype)

Alternatively:

assertTrue(response.contentType()?.match(io.ktor.http.ContentType.Text.Html) == true)
topics/lib.topic (1)

372-374: Good warning; consider cross-linking.

Nice addition. Add a link anchor to the detailed explanation in server-configuration-file.topic for consistency.

topics/server-create-a-new-project.topic (3)

65-75: Alt text mismatches the artifact value.

Text uses com.example.ktor-sample, alt says org.example.ktor-sample. Align them to avoid confusion.


741-745: Typo: “de IDE” → “the IDE”.

Fix the article.

-... added automatically by de IDE:
+... added automatically by the IDE:

642-647: Grammar nit.

“have the chosen the option” → “have chosen the option”.

-If you have the chosen the option to store configuration in code,
+If you have chosen the option to store configuration in code,
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fa3cd64 and 69faa5c.

⛔ Files ignored due to path filters (17)
  • codeSnippets/snippets/tutorial-server-get-started/gradle/wrapper/gradle-wrapper.jar is excluded by !**/*.jar
  • images/ktor_project_generator_new_project_artifact_name.png is excluded by !**/*.png
  • images/ktor_project_generator_new_project_artifact_name_dark.png is excluded by !**/*.png
  • images/ktor_project_generator_new_project_configure.png is excluded by !**/*.png
  • images/ktor_project_generator_new_project_configure_dark.png is excluded by !**/*.png
  • images/ktor_project_generator_new_project_download.png is excluded by !**/*.png
  • images/ktor_project_generator_new_project_download_dark.png is excluded by !**/*.png
  • images/server_get_started_idea_gradle_run.png is excluded by !**/*.png
  • images/server_get_started_idea_gradle_run_dark.png is excluded by !**/*.png
  • images/server_get_started_idea_main_folder.png is excluded by !**/*.png
  • images/server_get_started_idea_main_folder_dark.png is excluded by !**/*.png
  • images/server_get_started_idea_project_view.png is excluded by !**/*.png
  • images/server_get_started_idea_project_view_dark.png is excluded by !**/*.png
  • images/server_get_started_idea_resources_folder.png is excluded by !**/*.png
  • images/server_get_started_idea_resources_folder_dark.png is excluded by !**/*.png
  • images/server_get_started_idea_run_terminal.png is excluded by !**/*.png
  • images/server_get_started_idea_run_terminal_dark.png is excluded by !**/*.png
📒 Files selected for processing (29)
  • codeSnippets/settings.gradle.kts (0 hunks)
  • codeSnippets/snippets/tutorial-server-get-started-maven/pom.xml (3 hunks)
  • codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/Application.kt (1 hunks)
  • codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/Routing.kt (2 hunks)
  • codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/com/example/Application.kt (0 hunks)
  • codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/com/example/plugins/Routing.kt (0 hunks)
  • codeSnippets/snippets/tutorial-server-get-started-maven/src/main/resources/logback.xml (1 hunks)
  • codeSnippets/snippets/tutorial-server-get-started-maven/src/test/kotlin/ApplicationTest.kt (1 hunks)
  • codeSnippets/snippets/tutorial-server-get-started-maven/src/test/kotlin/com/example/ApplicationTest.kt (0 hunks)
  • codeSnippets/snippets/tutorial-server-get-started/README.md (1 hunks)
  • codeSnippets/snippets/tutorial-server-get-started/build.gradle.kts (1 hunks)
  • codeSnippets/snippets/tutorial-server-get-started/gradle.properties (1 hunks)
  • codeSnippets/snippets/tutorial-server-get-started/gradle/libs.versions.toml (1 hunks)
  • codeSnippets/snippets/tutorial-server-get-started/gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • codeSnippets/snippets/tutorial-server-get-started/gradlew (1 hunks)
  • codeSnippets/snippets/tutorial-server-get-started/gradlew.bat (1 hunks)
  • codeSnippets/snippets/tutorial-server-get-started/settings.gradle.kts (1 hunks)
  • codeSnippets/snippets/tutorial-server-get-started/src/main/kotlin/Application.kt (1 hunks)
  • codeSnippets/snippets/tutorial-server-get-started/src/main/kotlin/Routing.kt (1 hunks)
  • codeSnippets/snippets/tutorial-server-get-started/src/main/kotlin/com/example/Application.kt (0 hunks)
  • codeSnippets/snippets/tutorial-server-get-started/src/main/resources/application.yaml (1 hunks)
  • codeSnippets/snippets/tutorial-server-get-started/src/main/resources/logback.xml (1 hunks)
  • codeSnippets/snippets/tutorial-server-get-started/src/main/resources/mycontent/sample.html (1 hunks)
  • codeSnippets/snippets/tutorial-server-get-started/src/test/kotlin/ApplicationTest.kt (1 hunks)
  • codeSnippets/snippets/tutorial-server-get-started/src/test/kotlin/com/example/ApplicationTest.kt (0 hunks)
  • topics/lib.topic (2 hunks)
  • topics/maven-assembly-plugin.md (1 hunks)
  • topics/server-configuration-file.topic (1 hunks)
  • topics/server-create-a-new-project.topic (30 hunks)
💤 Files with no reviewable changes (6)
  • codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/com/example/plugins/Routing.kt
  • codeSnippets/snippets/tutorial-server-get-started-maven/src/test/kotlin/com/example/ApplicationTest.kt
  • codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/com/example/Application.kt
  • codeSnippets/snippets/tutorial-server-get-started/src/test/kotlin/com/example/ApplicationTest.kt
  • codeSnippets/settings.gradle.kts
  • codeSnippets/snippets/tutorial-server-get-started/src/main/kotlin/com/example/Application.kt
🧰 Additional context used
🧬 Code graph analysis (4)
codeSnippets/snippets/tutorial-server-get-started-maven/src/test/kotlin/ApplicationTest.kt (1)
codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/Application.kt (1)
  • module (9-11)
codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/Application.kt (1)
codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/Routing.kt (1)
  • configureRouting (10-35)
codeSnippets/snippets/tutorial-server-get-started/src/test/kotlin/ApplicationTest.kt (1)
codeSnippets/snippets/tutorial-server-get-started/src/main/kotlin/Application.kt (1)
  • module (9-11)
codeSnippets/snippets/tutorial-server-get-started/src/main/kotlin/Application.kt (1)
codeSnippets/snippets/tutorial-server-get-started/src/main/kotlin/Routing.kt (1)
  • configureRouting (10-35)
🔇 Additional comments (25)
codeSnippets/snippets/tutorial-server-get-started/src/main/resources/mycontent/sample.html (1)

8-12: Formatting improvement looks good.

The re-indentation of the list elements improves readability and maintains consistency with standard HTML formatting conventions. No functional or content changes.

codeSnippets/snippets/tutorial-server-get-started/src/main/resources/application.yaml (1)

1-6: YAML configuration structure looks correct for EngineMain-based Ktor startup.

The YAML follows proper Ktor conventions with a valid module reference and standard development port configuration.

However, verify that the module path com.example.ApplicationKt.module (line 4) matches the actual location of the Application.kt file and that the module function is properly defined there. Given the PR includes a transition to EngineMain-based startup, ensure this YAML configuration is correctly wired to the application's entry point.

Additionally, note that the PR objectives mention adding a warning about YAML limitations in Maven projects—confirm this warning is present in the accompanying tutorial documentation.

codeSnippets/snippets/tutorial-server-get-started-maven/src/main/resources/logback.xml (1)

7-7: LGTM! Appropriate log level for tutorial.

Changing the root logger level from trace to INFO reduces log verbosity and is more appropriate for a tutorial project. Trace-level logging is typically reserved for debugging purposes.

codeSnippets/snippets/tutorial-server-get-started/gradle.properties (1)

1-1: LGTM! Standard Kotlin configuration.

This property configures the official Kotlin code style, which is appropriate for tutorial projects to demonstrate best practices.

codeSnippets/snippets/tutorial-server-get-started/src/main/resources/logback.xml (1)

7-7: LGTM! Consistent logging configuration.

The log level change from trace to INFO is appropriate and consistent with the Maven variant of this tutorial.

codeSnippets/snippets/tutorial-server-get-started/README.md (1)

3-12: LGTM! Documentation accurately reflects standalone project structure.

The changes correctly update the README to reflect that this is now a standalone project rather than a submodule of the parent Gradle build. The simplified Gradle command (./gradlew run instead of :tutorial-server-get-started:run) is appropriate.

topics/maven-assembly-plugin.md (1)

24-31: LGTM! Documentation correctly updated.

The documentation accurately explains the distinction between EngineMain and embeddedServer approaches, and the line reference update (121-144) aligns with the restructured pom.xml.

codeSnippets/snippets/tutorial-server-get-started-maven/pom.xml (3)

43-47: LGTM! StatusPages dependency added correctly.

The ktor-server-status-pages-jvm dependency is correctly added to support the StatusPages plugin used in the routing configuration.


124-124: LGTM! Maven Assembly plugin upgraded.

Upgrading from version 2.6 to 3.7.1 brings the plugin to a more recent version with bug fixes and improvements.


14-15: I need to verify the latest available versions since the Maven Central query didn't parse correctly.

Based on the web search results, I can now confirm that:

The latest logback version is 1.5.19 (released September 30, 2025), and version 1.5.18 exists and is referenced in release notes. Therefore, the downgrade from 1.5.18 to 1.4.14 is confirmed.

For SLF4J, the current stable and actively developed version is 2.0.17 (released February 25, 2025). The downgrade from 2.0.12 to 2.0.9 is confirmed.

From the security advisories provided in the earlier script execution, version 1.4.14 is safe from the HIGH severity serialization vulnerabilities that affect versions < 1.4.12.

However, the critical finding is that the 1.5.x series is a direct descendant of and a drop-in replacement for the 1.4.x series, which means there's no technical barrier preventing the use of the newer versions.


Confirm the intentional nature of these version downgrades and document the reason.

Both logback_version (1.5.18 → 1.4.14) and slf4j_version (2.0.12 → 2.0.9) are confirmed downgrades to older versions. Since the latest versions (logback 1.5.19 and SLF4J 2.0.17) are available and the 1.5.x series is documented as a drop-in replacement for 1.4.x, please clarify and document the reason for reverting to these older versions (e.g., compatibility constraints, tutorials targeting specific versions, intentional reference implementations).

codeSnippets/snippets/tutorial-server-get-started-maven/src/test/kotlin/ApplicationTest.kt (2)

14-23: LGTM! Root endpoint test is well-structured.

The test correctly uses the testApplication DSL and properly verifies both the HTTP status and response body.


25-36: LGTM! HTML endpoint test has good coverage.

The test properly validates the HTTP status, content type, and response body content. Good use of assertContains for partial content matching.

codeSnippets/snippets/tutorial-server-get-started/src/main/kotlin/Routing.kt (2)

10-15: LGTM! StatusPages configuration is correct.

The StatusPages plugin is properly installed with an exception handler for IllegalStateException, demonstrating error handling for tutorial purposes.


16-34: LGTM! Routing configuration is well-structured.

The routing setup demonstrates multiple use cases:

  • Static resource serving
  • Plain text responses
  • HTML responses with explicit content type
  • Error handling demonstration

All handlers are correctly implemented for tutorial purposes.

topics/server-configuration-file.topic (1)

73-75: LGTM! Important user guidance added.

The warning clearly communicates the YAML configuration limitation for Maven-based projects, helping users avoid configuration issues. The placement directly under the YAML section is appropriate and consistent with the PR objectives.

codeSnippets/snippets/tutorial-server-get-started/gradlew.bat (1)

1-94: LGTM! Standard Gradle wrapper script.

This is a standard Gradle-generated wrapper script for Windows with proper error handling and exit code propagation. No concerns.

codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/Application.kt (1)

1-11: LGTM! Clean EngineMain-based application structure.

The entry point follows Ktor best practices by delegating to EngineMain and properly wiring the application module. The separation between the entry point and routing configuration is clean.

codeSnippets/snippets/tutorial-server-get-started/src/main/kotlin/Application.kt (1)

1-11: LGTM! Consistent with Maven variant.

The Gradle variant maintains the same clean structure as the Maven version, which is appropriate for tutorial purposes where each variant should be self-contained and independently understandable.

codeSnippets/snippets/tutorial-server-get-started/gradle/wrapper/gradle-wrapper.properties (1)

1-7: LGTM! Secure Gradle wrapper configuration.

The wrapper properties follow best practices with URL validation enabled and a reasonable network timeout. The Gradle 8.14.3 distribution is properly configured.

codeSnippets/snippets/tutorial-server-get-started-maven/src/main/kotlin/Routing.kt (1)

1-35: LGTM! Well-structured routing configuration.

The routing setup demonstrates key Ktor features including:

  • StatusPages plugin for error handling
  • Static content serving
  • Different response types (plain text and HTML)
  • Error handling example

The package simplification to com.example and the comment placeholder at Line 23 appear intentional for tutorial clarity.

codeSnippets/snippets/tutorial-server-get-started/settings.gradle.kts (1)

1-7: LGTM! Clean settings configuration.

The settings file properly establishes the project name and centralizes dependency resolution through Maven Central. This works well with the version catalog introduced in this PR.

codeSnippets/snippets/tutorial-server-get-started/gradle/libs.versions.toml (1)

1-17: Version catalog is current and well-structured.

Kotlin 2.2.20 and Ktor 3.3.0 are the latest stable versions as of October 2025, confirming the dependencies are up-to-date. The version catalog properly centralizes dependency versions and follows Gradle conventions for consistent management across the tutorial project.

codeSnippets/snippets/tutorial-server-get-started/gradlew (1)

1-251: No issues found.

The wrapper script is correctly committed with executable permissions (mode 100755) and the gradle-wrapper.jar file is present at the expected location alongside gradle-wrapper.properties.

codeSnippets/snippets/tutorial-server-get-started/build.gradle.kts (1)

1-4: Repositories are properly configured via dependencyResolutionManagement in settings.gradle.kts—no action required.

The script output confirms that codeSnippets/snippets/tutorial-server-get-started/settings.gradle.kts contains the dependencyResolutionManagement block with repositories { mavenCentral() } configured. This file-level repository configuration is the expected pattern and resolves the concern raised.

topics/server-create-a-new-project.topic (1)

984-987: The shortcuts shown in the code are correct. macOS uses Shift + Command + I (⇧⌘I), and Windows/Linux uses Ctrl + Shift + O, which matches exactly what appears in the code. No changes are required.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
topics/server-create-a-new-project.topic (1)

573-574: Fix inconsistent ordering between task list and actual sections.

The task list (Lines 573-574) declares the order as:

  1. change-the-default-port (default port)
  2. change-the-port-via-yaml (port via YAML)

However, the actual sections appear in reverse order:

  1. Line 589: change-the-port-via-yaml section appears first
  2. Line 636: change-the-default-port section appears second

This contradicts the guidance at Lines 581-583 that tasks should be "attempted in the order declared." Either reorder the task list links or reorder the actual sections to match.

Additionally, the section title at Line 589 ("Change the default port") is generic and doesn't indicate it's specifically about YAML/HOCON configuration, which might confuse readers expecting code-based configuration first.

Also applies to: 589-636

♻️ Duplicate comments (2)
topics/server-create-a-new-project.topic (2)

827-827: Verify keyboard shortcut for potential Cyrillic character.

A past review flagged this line for potentially containing a Cyrillic "С" instead of Latin "C" in the shortcut. Please verify that the shortcut uses only Latin characters: ⌘Cmd+N (not ⌘Сmd+N).

The issue can be verified by copying the character and checking its Unicode value, or by searching the file for Cyrillic characters.


555-560: Correct IntelliJ IDEA capitalization in image alt text.

The brand name should be "IntelliJ IDEA" with capital I and J, not "intelliJ IDEA".

Apply this diff:

-                                                                             alt="intelliJ IDEA terminate icon"/>.
+                                                                             alt="IntelliJ IDEA terminate icon"/>.
 ...
-                                                                        alt="intelliJ IDEA rerun icon"/>.
+                                                                        alt="IntelliJ IDEA rerun icon"/>.
🧹 Nitpick comments (1)
codeSnippets/snippets/tutorial-server-get-started/build.gradle.kts (1)

14-16: Consider removing inline comments for cleaner code.

The comments "// Added new dependency" and "// Existing dependencies" add minimal value and can be removed for improved readability. Grouping alone makes the intent clear.

 dependencies {
-    // Added new dependency
     implementation(libs.ktor.server.status.pages)
-    // Existing dependencies
     implementation(libs.ktor.server.core)
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 69faa5c and c3df5e1.

📒 Files selected for processing (5)
  • codeSnippets/snippets/tutorial-server-get-started-maven/pom.xml (3 hunks)
  • codeSnippets/snippets/tutorial-server-get-started/build.gradle.kts (1 hunks)
  • topics/lib.topic (2 hunks)
  • topics/maven-assembly-plugin.md (1 hunks)
  • topics/server-create-a-new-project.topic (30 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • topics/lib.topic
  • topics/maven-assembly-plugin.md
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-24T08:27:00.168Z
Learnt from: vnikolova
PR: ktorio/ktor-documentation#708
File: codeSnippets/snippets/tutorial-server-get-started/build.gradle.kts:9-11
Timestamp: 2025-10-24T08:27:00.168Z
Learning: In Ktor projects generated by the official Ktor project generator, the syntax `mainClass = "io.ktor.server.netty.EngineMain"` (direct property assignment) is the official generated format and should not be changed to `mainClass.set("...")` in build.gradle.kts files.

Applied to files:

  • codeSnippets/snippets/tutorial-server-get-started/build.gradle.kts
  • codeSnippets/snippets/tutorial-server-get-started-maven/pom.xml
🔇 Additional comments (8)
codeSnippets/snippets/tutorial-server-get-started-maven/pom.xml (3)

14-15: Clarify the rationale for version downgrades.

Both logback_version and slf4j_version have been downgraded (1.5.18→1.4.14 and 2.0.12→2.0.9 respectively). Downgrades are atypical and may indicate compatibility concerns. Please confirm this is intentional and document the reason.


18-18: Main class configuration aligns with Ktor conventions.

The update to io.ktor.server.netty.EngineMain is the official generated format for Ktor projects.

Based on learnings.


119-119: Verify maven-assembly-plugin 3.7.1 compatibility.

The upgrade from 2.6 to 3.7.1 is a major version jump (2→3). Please verify that no breaking changes in the assembly plugin affect the build or generated artifacts, especially regarding the jar-with-dependencies descriptor and manifest configuration.

codeSnippets/snippets/tutorial-server-get-started/build.gradle.kts (4)

2-3: Version catalog adoption looks good.

The migration to version catalog aliases for plugins follows Gradle best practices and centralizes dependency management.


6-7: Metadata addition is appropriate.

The group and version properties are correctly specified for the project.


9-10: mainClass configuration is correct.

The direct property assignment syntax mainClass = "..." aligns with the official Ktor project generator output. Based on learnings


20-20: Verify the configuration library identifier.

The identifier libs.ktor.server.config.yFaml appears suspicious—is this intended to be libs.ktor.server.config.yaml? Please confirm that yFaml is the correct catalog entry name.

topics/server-create-a-new-project.topic (1)

986-986: No issues found. The keyboard shortcut at line 986 contains only Latin characters. The 'C' in 'Cmd' is confirmed as Latin (U+0043), not Cyrillic. The original concern is unfounded.

Likely an incorrect or invalid review comment.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (4)
topics/server-create-a-new-project.topic (4)

585-593: Align chapter title and add an explicit Maven YAML warning.

  • The chapter’s title says “Change the default port” but this section is specifically about YAML/HOCON. Make it explicit to match the list entry and reduce confusion.
  • Per PR objective, add a clear warning that Maven projects cannot use YAML (use HOCON instead).
-        <chapter title="Change the default port" id="change-the-port-via-yaml">
+        <chapter title="Change the port via YAML" id="change-the-port-via-yaml">
...
-            </p>
+            </p>
+            <warning>
+                YAML configuration files (application.yaml) are not supported in Maven-based Ktor projects.
+                For Maven, use HOCON (application.conf) instead.
+            </warning>

511-512: Capitalize “IntelliJ IDEA” consistently in alt texts.

Several alt attributes use “intelliJ” instead of “IntelliJ”. Fix for consistency and accessibility polish.

-                        by clicking the Gradle icon (<img alt="intelliJ IDEA gradle icon"
+                        by clicking the Gradle icon (<img alt="IntelliJ IDEA Gradle icon"

-                                                                             alt="intelliJ IDEA terminate icon"/>.
+                                                                             alt="IntelliJ IDEA Terminate icon"/>

-                                                                        alt="intelliJ IDEA rerun icon"/>.
+                                                                        alt="IntelliJ IDEA Rerun icon"/>

-                    <p>Click on the rerun button (<img alt="intelliJ IDEA rerun button icon"
+                    <p>Click on the rerun button (<img alt="IntelliJ IDEA Rerun button icon"

-                    <p>Click on the rerun button (<img alt="intelliJ IDEA rerun button icon"
+                    <p>Click on the rerun button (<img alt="IntelliJ IDEA Rerun button icon"

-                    <img src="server_get_started_add_new_http_endpoint.png" alt="An HTTP request file in intelliJ IDEA"
+                    <img src="server_get_started_add_new_http_endpoint.png" alt="An HTTP request file in IntelliJ IDEA"

-                    <p>Click on the rerun button (<img alt="intelliJ IDEA rerun button icon"
+                    <p>Click on the rerun button (<img alt="IntelliJ IDEA Rerun button icon"

-                    <p>Click on the rerun button (<img alt="intelliJ IDEA rerun button icon"
+                    <p>Click on the rerun button (<img alt="IntelliJ IDEA Rerun button icon"

Also applies to: 549-552, 555-557, 618-621, 680-682, 754-761, 854-856, 1024-1026


367-371: Optional: add native PowerShell alternative for extracting ZIP on Windows.

Not all Windows environments have tar. Add an “Alternatively” snippet for PowerShell’s Expand-Archive.

                         <code-block lang="console">
                             tar -xf ktor-sample.zip
                         </code-block>
+                        <p>Alternatively (PowerShell):</p>
+                        <code-block lang="powershell">
+                            Expand-Archive -Path .\ktor-sample.zip -DestinationPath .
+                        </code-block>

719-727: Normalize code-block language capitalization.

Use lang="kotlin" consistently (lowercase) as used elsewhere in the topic.

-                    <code-block lang="Kotlin" validate="true">
+                    <code-block lang="kotlin" validate="true">
...
-            <code-block lang="Kotlin">
+            <code-block lang="kotlin">

Also applies to: 931-935

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c3df5e1 and bc8252a.

📒 Files selected for processing (1)
  • topics/server-create-a-new-project.topic (35 hunks)
🔇 Additional comments (1)
topics/server-create-a-new-project.topic (1)

364-366: The review comment is factually incorrect and should be disregarded.

The ZIP structure from start.ktor.io contains a flat project layout (build.gradle.kts, src/, gradlew, etc. at the root), not a nested ktor-sample/ directory. Using unzip ktor-sample.zip -d ktor-sample is the correct approach—it extracts the flat contents into an organized ktor-sample/ folder. Removing -d would scatter files into the current directory instead.

Additionally, the review claims the issue "Also applies to: 378-380," but those lines contain only the cd ktor-sample command, not a second unzip command. There is only one unzip command in the file.

Likely an incorrect or invalid review comment.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bc8252a and a310462.

📒 Files selected for processing (1)
  • topics/server-create-a-new-project.topic (35 hunks)
🔇 Additional comments (11)
topics/server-create-a-new-project.topic (11)

68-71: LGTM! Artifact name now consistent.

The artifact name and alt text both correctly reference com.example.ktor-sample, resolving the previous inconsistency.


174-176: LGTM! Simplified project naming.

The project name is now consistently ktor-sample throughout the documentation, which aligns with the PR objectives.


341-378: LGTM! Consistent path updates.

All references to the project name, paths, and archive names have been correctly updated to ktor-sample.


490-495: LGTM! Settings filename corrected.

The file name is now correctly shown as settings.gradle.kts (with a dot) instead of the previously flagged hyphenated version. The snippet reference path also uses the correct filename.


577-584: LGTM! Clear task guidance.

The updated text provides clearer guidance about task order and complexity, improving the tutorial flow.


712-717: LGTM! Clearer navigation instructions.

The addition of an alternative navigation method (opening the Routing.kt file directly) provides users with multiple ways to reach the same destination, improving the tutorial's accessibility.


888-911: LGTM! Test code and imports are complete.

The integration test code includes all necessary imports, including the previously flagged contentType import at line 932. The snippet reference includes line 37, which the maintainer confirmed is valid.


965-985: LGTM! Gradle configuration updated correctly.

The instructions now reference the version catalog file (gradle/libs.versions.toml) and include proper reload shortcuts that match current IDE defaults. The restructuring aligns with the PR objective to enable use of the version catalog.


990-1015: LGTM! Error handler configuration is clear.

The error handler setup instructions properly reference the Routing.kt file and include the correct import statement. The code snippets use appropriate line ranges.


918-920: No trailing dot detected—code is correct.

The verified output shows line 919 contains <code>0.0.0.0</code> with no trailing dot after the IP address. The concern raised in the review has been verified as resolved.


822-824: No issues found — the code is correct as written.

Verification confirms that the shortcut elements use only Latin characters and symbols. The "C" in both ⌘Cmd+N and Ctrl+N is the standard Latin capital C (U+0043), not the Cyrillic "С" (U+0421). No Cyrillic characters are present in lines 822–824.

Copy link
Contributor

@bjhham bjhham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

Copy link
Contributor

@daniCsorbaJB daniCsorbaJB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice changes! 💯 I left a couple of suggestions.

Summary of my comments:

  • Some of the images seem to use the old name com.example.ktor-sample-app
  • Some suggestions to remove weak modal verbs like should especially where it makes it a bit difficult to understand when something might or might not happen.
  • Couple of comma fix suggestions.
  • Some suggestions to remove future tense where possible.

Copy link
Contributor

@daniCsorbaJB daniCsorbaJB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the changes! 🥳 — I left just one last comment otherwise LGTM 🚀

@vnikolova vnikolova merged commit b09fc2c into main Oct 30, 2025
1 check was pending
@vnikolova vnikolova deleted the vnikolova/KTOR-8962 branch October 30, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants